arrow-ord 52.2.0

Ordering kernels for arrow arrays
Documentation
Arrow ordering kernels # Sort RecordBatch ``` # use std::sync::Arc; # use arrow_array::*; # use arrow_array::cast::AsArray; # use arrow_array::types::Int32Type; # use arrow_ord::sort::sort_to_indices; # use arrow_select::take::take; # let a: ArrayRef = Arc::new(Int32Array::from(vec![1, 2, 3, 4])); let b: ArrayRef = Arc::new(StringArray::from(vec!["b", "a", "e", "d"])); let batch = RecordBatch::try_from_iter(vec![("a", a), ("b", b)]).unwrap(); // Sort by column 1 let indices = sort_to_indices(batch.column(1), None, None).unwrap(); // Apply indices to batch columns let columns = batch.columns().iter().map(|c| take(&*c, &indices, None).unwrap()).collect(); let sorted = RecordBatch::try_new(batch.schema(), columns).unwrap(); let col1 = sorted.column(0).as_primitive::(); assert_eq!(col1.values(), &[2, 1, 4, 3]); ```